<!-- 模板文件 -->
<script type="text/javascript">
jQuery(function(){
	//换颜色
	jQuery('#colorChange span').click(function(){
			jQuery(this).addClass('s').siblings('span').removeClass('s');
			var _color = jQuery(this).attr('data-val');
			jQuery('.f100-hd').css('border-top-color',_color);
			jQuery('dl.lv2 dt').css('background-color',_color);
		});
});
</script>
<div id="saveToDatabase">


	<div class="modl">
      
      <div class="f100-hd">
     	 <h3>
          	分类导航
            <a target="_blank" href="http://shop<?php echo $_SESSION["shopid"];?>.taobao.com/search.htm?search=y&orderType=newOn" title="按新品查看">按上新时间</a>
            <a target="_blank" href="http://shop<?php echo $_SESSION["shopid"];?>.taobao.com/search.htm?search=y&orderType=hotsell" title="按销量查看">按销量</a>
            <a target="_blank" href="http://shop<?php echo $_SESSION["shopid"];?>.taobao.com/search.htm?search=y&orderType=price" title="按价格查看">按价格</a>
            <a target="_blank" href="http://shop<?php echo $_SESSION["shopid"];?>.taobao.com/?search=y" title="查看所有宝贝">查看所有宝贝&gt;&gt;</a>
          </h3>
      </div>
      
      	<div class="f100-bd">

          <ul class="lv1 clearFix">
          <?php 
          $_k = 0;
          $min_line = 5;
		  $_count = count($test_cats);
		  foreach($test_cats as $key=>$val){
               echo '<li>';
               echo '<dl class="lv2 clearFix">';
               echo '<dt><a href="http://shop'.$_SESSION["shopid"].'.taobao.com/search.htm?search=y&scid='.$key.'&queryType=cat" class="f100-m" target="_blank">'.$val['name'].'</a></dt>'; 
                  if(count($val) > 1){
                      foreach($val['sub'] as $k=>$v) :
                           echo '<dd><a href="http://shop'.$_SESSION["shopid"].'.taobao.com/search.htm?search=y&scid='.$k.'&queryType=cat" target="_blank">'.$v.'</a></dd>';
                      endforeach;
                  }
               echo '</dl>';
               echo '</li>';
			   unset($test_cats[$key]);
			   $_k++;
			   if($_k >= $min_line) break;
           }
		  $d_value = $min_line - $_count;
		  if($d_value > 0){
			  for($i=0;$i<$d_value;$i++){
				  echo '<li><dl class="lv2 clearFix"></dl></li>';
				  }
			}
			
          ?>
          </ul>
        </div>
        
        <div class="f100ww">
          <table class="verticalTab">
          	<tr>
            	<td width="160"><div class="ww-hd"><strong>SERVICE HOT</strong>在线客服导航</div></td>
                <td>
                <ul class="wwBox1 clearFix">
				<?php 
                $wangwang_small = $wangwang;
                $_k = 0;
                $min_line = 2;
                //$_count = count($wangwang);
                foreach($wangwang as $key=>$val){
                     if($val['name'] == '应用服务访问权') continue;
                     echo '<li>';
                     echo '<dl class="wwBox2 clearFix">';
                     //echo '<dt>'.$val['name'].'</dt>'; 
                        if(count($val) > 1){
                            foreach($val['group'] as $k=>$v) :
                                 $v2 = explode(':',$v);
                                 $v3 = count($v2) > 1 ? $v2[1] : $v2[0];
                                 echo '<dd><span>'.$v3.':</span><a target="_blank" href="http://www.taobao.com/webww/ww.php?ver=3&touid='.$v.'&siteid=cntaobao&status=1&charset=utf-8"><img border="0" src="http://amos.alicdn.com/online.aw?v=2&uid='.$v.'&site=cntaobao&s=1&charset=utf-8" alt="点这里给我发消息" /></a></dd>';
                            endforeach;
                        }
                     echo '</dl>';
                     echo '</li>';
                     unset($wangwang[$key]);
                     $_k++;
                     if($_k >= $min_line) break;
                 }
                ?>
                </ul>
                </td>
            </tr>
          </table>
          
          
        </div>
        
    </div>


</div> <!-- //saveToDatabase -->

<?php
	$data2['test_cats'] = $test_cats;
	$data2['wangwang'] = $wangwang;
	$data2['wangwang_small'] = $wangwang_small;
	$data2['fat1'] = 1;
	$data2['fat2'] = 2;
	$this->load->view('keyboard_service_view',$data2);
?>

<!--

<a target="_blank" href="http://www.taobao.com/webww/ww.php?ver=3&touid='.$v.'&siteid=cntaobao&status=1&charset=utf-8"><img border="0" src="http://amos.alicdn.com/online.aw?v=2&uid='.$v.'&site=cntaobao&s=2&charset=utf-8" alt="点这里给我发消息" /></a>

http://muhaha.taobao.com/category.htm?search=y
http://muhaha.taobao.com/category.htm?search=y&orderType=hotsell_desc
orderType=newOn_desc
orderType=price_asc


$_SESSION["shopid"]

http://muhaha.taobao.com/category-338449197.htm?search=y&catName=%C9%FA%BB%EE%B4%F3%B1%AC%D5%A8%26middot%3BT%D0%F4
http://muhaha.taobao.com/search.htm?search=y&scid=338449197

http://design-xin.taobao.com/category-532939511.htm?search=y
http://design-xin.taobao.com/search.htm?search=y&scid=532939511&queryType=cat&scname=zca89rGqzsYmbWlkZG90O8TaxNo%3D
-->